﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebUI.folders
{
    public partial class index : System.Web.UI.Page
    {
        int id = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["id"]))
            {
                id = int.Parse(Request.QueryString["id"]);
                loadFolder();
            }
        }
        void loadFolder()
        {
            dlFolder.DataSource = DMS.Logic.BL.getInstance().getFoldersByLibrary(id, -1);
            dlFolder.DataBind();
        }

        protected void dlLIb_ItemCommand(object source, DataListCommandEventArgs e)
        {
            if (e.CommandName == "go")
            {
                Response.Redirect("../Document/DocumentList.aspx?folderid=" + e.CommandArgument);
            }
        }
    }
}
